package com.qust.edu.aliyun.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.Date;

/**
 * projectName: ALIYUN
 *
 * @author: 姜龙
 * time: 2021/9/28 11:53
 * description:订单实体类
 */
@Data
public class Orders {

    @TableId( value = "order_id",type = IdType.AUTO)

    private Integer order_id;

    @JsonProperty("order_name")
    private String orderName;

    @JsonProperty("order_num")
    private Integer orderNum;

    @JsonProperty("order_status")
    private String orderStatus;

    @JsonIgnore
    @JsonProperty("product_id")
    private Integer productId;

    @JsonProperty("order_totall_price")
    private Integer orderTotallPrice;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JsonProperty("order_time")
    private Date    orderTime;

    @JsonProperty("order_piture")
    private String  orderPiture;

    @JsonProperty("product_id")
    private Integer buyerId;

    private Integer deleted;

    @TableField(exist = false)
    private Buyer buyer;

    @TableField(exist = false)
    private Product product;
}
